/*
 * Copyright (c) 2024 Black Sesame Technologies
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef _DAL_CLIENT_H_
#define _DAL_CLIENT_H_

#ifdef __cplusplus
extern "C" {
#endif

#include "dal/ret_type.h"
#include "dal/dds_entity.h"
#include "dal/qos_policy.h"
#include "dal/service_info.h"

typedef void (*dal_client_on_response_t)(const void* user_data);

dal_ret_t dal_client_send_request(dal_client_t* client, void* request);
dal_ret_t dal_client_take_response(dal_client_t* client,
                                   dal_service_info_t* request_header,
                                   void* response,
                                   bool* taken);
void dal_client_set_on_response_callback(dal_client_t* client,
                                         dal_client_on_response_t callback,
                                         const void* user_data);
dal_ret_t dal_client_check_server_is_available(dal_client_t* client, bool* available);

#ifdef __cplusplus
}
#endif

#endif  // _DAL_CLIENT_H_
